<?php
/* @var $this ImgsController */
/* @var $model Imgs */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'imgs-form',
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data'),
)); ?>


	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

    <div class="row">
        <?php echo $form->labelEx($model,'type'); ?>
        <?php echo $form->textField($model,'type',array('size'=>6,'maxlength'=>6)); ?>
        <?php echo $form->error($model,'type'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textArea($model,'content',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>

    <div class="row">
        <?php echo $form->labelEx($model,'img'); ?>
        <?php echo $form->fileField($model,'img',array('size'=>60)); ?>
        <?php echo $form->error($model,'img'); ?>
        <?php
        if(!empty($model->img)){
            echo '<img src="'.$model->img.'" style="max-width:640px;" />';
        }
        ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'longitude'); ?>
        <?php echo $form->textField($model,'longitude',array('size'=>60)); ?>
        <?php echo $form->error($model,'longitude'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'latitude'); ?>
        <?php echo $form->textField($model,'latitude',array('size'=>60)); ?>
        <?php echo $form->error($model,'latitude'); ?>
    </div>

	<div class="row">
		<?php echo $form->labelEx($model,'url'); ?>
		<?php echo $form->textField($model,'url',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'url'); ?>
	</div>
	
    <div class="row">
        <label for="imei" class="required">imei <span class="required">*</span></label>
        <input name="imei" id="imei" type="text" />
    </div>
	<!-- 
    <div class="row">
        <label for="UserLogin_username" class="required">username <span class="required">*</span></label>
        <input name="UserLogin[username]" id="UserLogin_username" type="text" />
    </div>

    <div class="row">
        <label for="UserLogin_password" class="required">password <span class="required">*</span></label>
        <input name="UserLogin[password]" id="UserLogin_password" type="password" />
    </div>
 -->
    <input name="UserLogin[rememberMe]" id="UserLogin_rememberMe" value="1" type="hidden" />

    <div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->